interface FetchNoticeAPIParams {
  page: string
  limit: string
}

interface FetchNoticeAPIResData {
  code: number
  msg: string
  time: string
  data: {
    data: Notice[]
    current_page: number
    total: number
    per_page: number
    last_page: number
  }
}

/**
 * @description 分页获取通知列表数据
 */
export function fetchNoticesAPI(params: FetchNoticeAPIParams, token: string) {
  return httpInstance.get<FetchNoticeAPIResData, FetchNoticeAPIParams>(
    '/api/notice/index',
    { params, headers: { token } },
  )
}
